import { defineStore } from "pinia";

export const userUse = defineStore('user',{
    state(){
        return {
            datas:[]
        }
    },
    actions:{
        async fetchgoods(){
             await fetch('http://chst.vip/data/index.json')
             .then(body=>body.json())
                .then(res=>{
                   this.datas = res.data
                })
        }
    }
})